//分割链接
function getQueryVariable(variable){
    var query =decodeURI(window.location.search.substring(1));
    var vars = query.split("&");
    for (var i=0;i<vars.length;i++) {
       var pair = vars[i].split("=");
       if(pair[0] == variable){return pair[1];}
    }
    return(false);
}

window.onload=function(){
	
}




mui.init({swipeBack: false,});    
var slider = mui("#slider");
slider.slider({interval: 1000});
var Main = mui('#Main');//侧滑容器父节点
Main[0].classList.add('mui-scalable');//动画效果的类
Main.offCanvas().refresh();//绑定动画效果     

document.getElementById('offCanvasShow').addEventListener('tap',function()
{
    Main.offCanvas('show');
});

document.getElementById('offCanvasHide').addEventListener('tap',function()
{
    Main.offCanvas('close');
});

//支持区域滚动，需要添加.mui-scroll-wrapper
mui('#offCanvasSideScroll').scroll();
mui('#offCanvasContentScroll').scroll();

//实现ios平台的侧滑关闭页面；
if (mui.os.plus && mui.os.ios)
{
    Main[0].addEventListener('shown',
    function(e) { //菜单显示完成事件
        plus.webview.currentWebview().setStyle
        ({
            'popGesture': 'none'
        });
    });
    Main[0].addEventListener('hidden',
    function(e)
    {     //菜单关闭完成事件
        plus.webview.currentWebview().setStyle
        ({
            'popGesture': 'close'
        });
    });
}